﻿@model PagedList.IPagedList<File_Manager.Models.Problemario_User_I>

@{
    ViewBag.Title = "Revisar Problemario";
}

<h2>Revisión Envío de Respuestas</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

<fieldset>
    <legend>Datos Problemario</legend>
        <table width="100%">
            <tr>
                <td width="33%">
                    <div class="display-label"><b>Etapa</b></div>
                    <div class="display-field">
                        @Html.Display("Etapa")
                    </div>
                </td>
                <td width="33%">
                    <div class="display-label"><b>Grupo</b></div>
                    <div class="display-field">
                        @if (ViewBag.idRol=="Guest_C")
                        {
                            <div style="display:inline;"> Ciencias de la Salud </div>
                        }
                        else if (ViewBag.idRol == "Guest_H")
                        {
                            <div style="display:inline;"> Humanidades y Sociales </div>
                        }
                        else if (ViewBag.idRol == "Guest_I")
                        {
                            <div style="display:inline;"> Ingeniería y Ciencias Básicas </div>
                        }
                        else if (ViewBag.idRol == "ALL")
                        {
                            <div style="display:inline;"> Grupo único </div>
                        }
                    </div>
                </td>
                <td width="33%">
                    <div class="display-label"><b>Jornada</b></div>
                    <div class="display-field">
                        @Html.Display("Jornada")
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="display-label"><b>Archivo PDF</b></div>
                    <div class="display-field">
                        @Html.Display("Archivo")
                    </div>
                </td>
                <td>
                    <div class="display-label"><b>Fecha Límite</b></div>
                    <div class="display-field">
                        @Html.Display("Fecha")
                    </div>
                </td>
                <td>
                    <div class="display-label"><b>N° de Envíos</b></div>
                    <div class="display-field">
                        @Html.Display("n_send")
                    </div>
                </td>
            </tr>
        </table>
</fieldset>

<table width="100%">
    <tr>
        <th>
            Nombres
        </th>
        <th>
            Apellidos
        </th>
        <th>
            @ViewBag.Materia_1
        </th>
        <th>
            @ViewBag.Materia_2
        </th>
        <th>
            @ViewBag.Materia_3
        </th>
        <th>
            Nota Promedio
        </th>
    </tr>

@foreach (var item in Model)
{
    <tr>
        <td width="26%">
            @Html.DisplayFor(modelItem => item.nUser_I.name)
        </td>
        <td width="26%">
            @Html.DisplayFor(modelItem => item.nUser_I.last_name)
        </td>
        <td width="12%">
            @Html.DisplayFor(modelItem => item.nota_1)
        </td>
        <td width="12%">
            @Html.DisplayFor(modelItem => item.nota_2)
        </td>
        <td width="12%">
            @Html.DisplayFor(modelItem => item.nota_3)
        </td>
        <td width="12%">
            @Html.DisplayFor(modelItem => item.nota_p)
        </td>
    </tr>
}

</table>


<br />

<div>
    Pag @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    de @Model.PageCount
    &nbsp;
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink("<<= ", "RevisarProblemario", new { page = 1, id = ViewBag.idPU })
        @Html.Raw("&nbsp;");
        @Html.ActionLink("<=", "RevisarProblemario", new { page = Model.PageNumber - 1, id = ViewBag.idPU })
    }
    else
    {
        @:<<=
        @Html.Raw("&nbsp;");
        @:<=
    }
    &nbsp;
    @if (Model.HasNextPage)
    {
        @Html.ActionLink("=>", "RevisarProblemario", new { page = Model.PageNumber + 1, id = ViewBag.idPU })
        @Html.Raw("&nbsp;");
        @Html.ActionLink(" =>>", "RevisarProblemario", new { page = Model.PageCount, id = ViewBag.idPU })
    }
    else
    {
        @:=>
        @Html.Raw("&nbsp;")
        @:=>>
    }
</div>


<p>
    @Html.ActionLink("Ir Atras", "Index")
</p>
